import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DocumentsComponent } from './documents.component';

const routes: Routes = <Routes>[{
  path: '',
  component: DocumentsComponent,
  children: [
    {
      path: ":id",
      loadChildren: 'app/document/document.module#DocumentModule'
    }
  ]
}];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class DocumentsRoutingModule { }
